console.log('14BaseRender');
let utils = data["utils"];
let RBushItem = data["RBushItem"];
let RBU = data["RBU"];
let RBush = data["RBush"];
let AreaForRender = data["AreaForRender"];
let quickselect = data["quickselect"];
let SphericalMercator = data["SphericalMercator"];
let PointItem = data["PointItem"];
let PointForRender = data["PointForRender"];
let BoundsItem = data["BoundsItem"];
let QuadTree = data["QuadTree"];
let Node = data["Node"];
let PointSimplifier = data["PointSimplifier"];
let BaseRender = data["BaseRender"];
let LeftNumFunnel = data["LeftNumFunnel"];


var boundsIntersect = BoundsItem.boundsIntersect,
  boundsContain = BoundsItem.boundsContain;
utils.extend(BaseRender.prototype, {
  getPointSimplifierInstance: function () {
    return this._ins
  },
  getPixelRatio: function () {
    // return Math.min(2, Math.round(window.devicePixelRatio || 1))
    return Math.min(2, Math.round(this._opts.devicePixelRatio || 1))
  },
  _triggerSelfAndInsEvent: function () { },
  getPointSize: function (styleOptions) {
    var pointStyleOptions = (styleOptions = styleOptions || this._opts).pointStyle || {
      width: 8,
      height: 8
    },
      pointSize;
    return {
      width: pointStyleOptions.width,
      height: pointStyleOptions.height,
      areaSize: pointStyleOptions.width * pointStyleOptions.height
    }
  },
  getPointHardcoreSize: function (styleOptions) {
    styleOptions = styleOptions || this._opts;
    var pointStyleOptions = utils.extend2({}, styleOptions.pointStyle, styleOptions.pointHardcoreStyle),
      pointSize;
    return {
      width: pointStyleOptions.width,
      height: pointStyleOptions.height,
      areaSize: pointStyleOptions.width * pointStyleOptions.height
    }
  },
  parseOffset: function (val, ref) {
    // if (isNaN(val) && "%" === val[val.length - 1] && (val = parseFloat(val.substr(0, val.length - 1)), isNaN(val) || (val = val / 100 * ref)), isNaN(val)) throw new Error("Parse offset failed: " + val);
    // return parseFloat(val)
    if ("%" === val[val.length - 1]) {
      val = parseFloat(val.substr(0, val.length - 1));
      val = val / 100 * ref;
    }
    return parseFloat(val);
  },
  getOffset: function (styleOptions, pSize) {
    var offset = styleOptions ? styleOptions.offset : null;
    return offset || (offset = ["-50%", "-50%"]), pSize || (pSize = styleOptions) ? [this.parseOffset(offset[0], pSize.width), this.parseOffset(offset[1], pSize.height)] : [0, 0]
  },
  getPointOffset: function (pSize) {
    return this.getOffset(this._opts.pointStyle, pSize)
  },
  getHardcoreOffset: function (pSize) {
    return this.getOffset(utils.extend2({}, this._opts.pointStyle, this._opts.pointHardcoreStyle), pSize)
  }
});

return {
  "utils": utils,
  "RBushItem": RBushItem,
  "RBU": RBU,
  "RBush": RBush,
  "AreaForRender": AreaForRender,
  "LeftNumFunnel": LeftNumFunnel,
  "quickselect": quickselect,
  "SphericalMercator": SphericalMercator,
  "PointItem": PointItem,
  "PointForRender": PointForRender,
  "BoundsItem": BoundsItem,
  "QuadTree": QuadTree,
  "Node": Node,
  "PointSimplifier": PointSimplifier,
  "BaseRender": BaseRender
}